{% extends 'wanplus/wangwangba/base_nav_frame.html' %}
{% load staticfiles %}
{% block content %}
  <p>栏目</p>
  <div>
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="wb-panel-wigdet">栏目清单</h4>
        <div class="wb-panel-wigdet-right">
          <button class="btn btn-default" type="button"><span class="fa fa-plus"></span></button>
        </div>
        <div class="clearfix"></div>
      </div>
      <table class="table table-hover table-striped" id="wwb-category-list">
      </table>
    </div>
  </div>
{% endblock %}
{% block jsscript %}
  <script type="text/javascript">
   $(document).ready(function(e) {
     var categoryTable = $("#wwb-category-list").table({
       columnKeys : ["cate_code", "cate_name", "content_count"]
       , columnNames : ["编号", "名称", "内容总数"]
       , columnBody : function(key, value, data) {
         return value;
       }
     });

     categoryTable.load([
       {
         "cate_code" : "c0002"
         , "cate_name" : "DogTV"
         , "content_count" : 400
       }
       , {
         "cate_code" : "c0003"
         , "cate_name" : "小百科"
         , "content_count" : 10
       }
       , {
         "cate_code" : "c0004"
         , "cate_name" : "汪汪Show"
         , "content_count" : 1200
       }
     ])
   });
  </script>
{% endblock %}